<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>slot-具名插槽的使用</title>
</head>
<script src="../js/vue.js"></script>
<body>

<div id="app">
    <qxf>
        <span slot="left">标题</span>
        <button slot="right">按钮</button>
    </qxf>
</div>

</body>

<template id="qxf">
    <div>
        <slot name="left"><span>左边</span></slot>
        <slot name="middle"><span>中间</span></slot>
        <slot name="right"><span>右边</span></slot>
    </div>
</template>

<script>
    const vue = new Vue({
        'el': '#app',
        'data': {},
        'methods': {},
        components: {
            'qxf': {
                template: '#qxf',
            }
        }
    })
</script>
</html>